const koa = require('koa')
const app = new koa()

const router = require('./router.js')

// 设置路由前缀
router.prefix('/api')
// koa-router 分配路由
app.use(router.routes(), router.allowedMethods())

app.listen(3000,()=>{
    console.log('running...');
})